Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refresh collation version when pulp_ansible is installed #863

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jun 3, 2024

No description provided.

@evgeni
Copy link
Member Author

evgeni commented Jun 3, 2024

testing via:

% ansible-playbook pipelines/clone_pipeline.yml -e pipeline_os=centos9-stream -e pipeline_type=clone -e pipeline_version=nightly -e '{"packit_prs":["theforeman/foreman_maintain/863"]}'

needs theforeman/forklift#1823

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a reference on why this is needed?

Comment on lines +21 to +23
execute!('runuser -c '\
'\'echo "ALTER COLLATION pulp_ansible_semver REFRESH VERSION;"'\
'| psql pulpcore\' postgres')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed for remote DBs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not when they don't switch the OS :)

@evgeni
Copy link
Member Author

evgeni commented Jun 3, 2024

Do you have a reference on why this is needed?

pulp_ansible ships an "own" collation since pulp/pulp_ansible@d442dde, which requires a "refresh" of the version (after the reindex) if the underlying collation library (icu) changes, which happens during 8to9. otherwise you get "WARNING: collation "pulp_ansible_semver" has version mismatch" in the postgres logs:

2024-06-03 13:00:26 UTC WARNING:  collation "pulp_ansible_semver" has version mismatch
2024-06-03 13:00:26 UTC DETAIL:  The collation in the database was created using version 153.80, but the operating system provides version 153.14.
2024-06-03 13:00:26 UTC HINT:  Rebuild all objects affected by this collation and run ALTER COLLATION public.pulp_ansible_semver REFRESH VERSION, or build PostgreSQL with the right library version.

we do the same in leapp.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why a custom collation is needed, but given it's used I think this is correct.

@ekohl ekohl merged commit c6e7c2d into master Jun 5, 2024
8 checks passed
@ekohl ekohl deleted the alter-ansible-collation branch June 5, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants